using System;
using System.Collections.Generic;

namespace Tarkin.InfrastructureLibrary.Core.Basic
{
    /// <summary>
    /// The Enumeration class is the implementation of the Enumeration metaclass class as defined by 
    /// section 10.3.2 of the Unified Modeling Language: Infrastructure specfication (version 
    /// 2.1.1, dated 07-02-06).
    /// </summary>
    /// <remarks>Tarkin classes are NOT thread-safe.</remarks>
    public class Enumeration : DataType
    {

#region Private Members

        /// <summary>
        /// The ordered collecton of literals for the enumeration.
        /// </summary>
        private List < EnumerationLiteral > ownedLiterals = null;

#endregion


#region Constructors

        /// <summary>
        /// Default constructor.
        /// </summary>
        public Enumeration ()
        { }

#endregion


#region Public Properties

        /// <summary>
        /// The ordered collecton of literals for the enumeration.
        /// </summary>
        public IList < EnumerationLiteral > OwnedLiterals
        {
            get
            {
                if ( ownedLiterals == null )
                {
                    ownedLiterals = new List < EnumerationLiteral > ();
                }

                return ownedLiterals;
            }
        }

#endregion

    }
}
